using System.Collections;
using System.Collections.Generic;
using Unity.Burst.Intrinsics;
using Unity.VisualScripting;
using UnityEngine;

public class MyRandom : MonoBehaviour
{
    public int seed = 12345;
    public void Knuth_Durstenfeld_Shuffle(ref int[] arr)
    {
        for (int i = arr.Length - 1; i >= 0; --i)
        {
            int randomIndex = Random.Range(0, i + 1);
            int temp = arr[randomIndex];
            arr[randomIndex] = arr[i];
            arr[i] = temp;

        }

    }
    private void Awake()
    {
        Random.InitState(seed);
    }
    // Start is called before the first frame update
    void Start()
    {
       //var  arr=new int []{ 1,2,3,4,5};
       // Knuth_Durstenfeld_Shuffle(ref arr);
       // foreach (int i in arr)
       // {
       //     Debug.Log(i);
       // }
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
